package org.gr.ias.trafficAdvisory.controller;

import lombok.extern.slf4j.Slf4j;
import org.gr.ias.common.entity.ActivityInformation;
import org.gr.ias.trafficAdvisory.service.TrafficAdvisoryService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import tk.mybatis.mapper.entity.Example;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 活动、资讯管理
 */
@Slf4j
@Controller
@RequestMapping(value = "/trafficAdvisory")
public class TrafficAdvisoryController {

    @Resource
    private TrafficAdvisoryService trafficAdvisoryService;

    /**
     * 跳转页面
     * @return
     */
    @RequestMapping("/trafficAdvisoryManage")
    public String toTrafficAdvisory(){
        return "power/trafficAdvisory";
    }


    /*
    * *发布活动、咨讯
    */
    @RequestMapping(value = "/publishTrafficAdvisory")
    public Map<String, Object> publishTrafficAdvisory(){
        Map<String,Object> map = new HashMap<>();
        log.info("开始发布活动、咨讯");
        Example example = new Example(ActivityInformation.class);
        log.info("发布活动、咨讯完毕");
        return map;
    }

   /* *
     * 查询活动
    */
    @RequestMapping(value = "/selectTrafficAdvisory")
    public Map<String, Object> selectTrafficAdvisory(){
        Map<String,Object> map = new HashMap<>();
        log.info("开始查询活动");
        log.info("查询活动完毕");
        return map;
    }

    /**
     * 关闭活动
    */
    @RequestMapping(value = "/closeTrafficAdvisory")
    public Map<String, Object> closeTrafficAdvisory(){
        Map<String,Object> map = new HashMap<>();
        log.info("开始关闭活动");
        log.info("关闭活动完毕");
        return map;
    }

    /**
     * 活动邀请
    */
    @RequestMapping(value = "/inviteTrafficAdvisory")
    public Map<String, Object> inviteTrafficAdvisory(){
        Map<String,Object> map = new HashMap<>();
        log.info("开始活动邀请");
        log.info("活动邀请完毕");
        return map;
    }
}
